package com.yudi.blog.bussiness.dao;

import com.yudi.blog.bussiness.dto.Comment;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @Author YuDi
 * @Date 2021/11/14 21:31
 * @Version 1.0
 */

public interface CommentRepository extends JpaRepository<Comment, Long> {

    List<Comment> findByBlogId(Long id, Sort sort);

    List<Comment> findByBlogIdAndParentCommentNull(Long id, Sort sort);
}
